-
Notifications
You must be signed in to change notification settings - Fork 197
Proposal to generate UUID
s using RandomNumberGenerator
s
#1271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fb5c82f
to
df12e88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need two proposal files
8f18f07
to
d9ffe2f
Compare
var secondBits = second | ||
|
||
// Set the version to 4 (0100 in binary) | ||
firstBits &= 0xFFFFFFFFFFFF0FFF // Clear the last 12 bits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the code wrong or the comment wrong? This appears to clear bits 12 ... 15.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment was wrong. This clears bits 48-51 of the UInt64 aligned with the RFC. Example below
10010100 10010010 10111010 11000100 11110011 01010011 00101001 11100111
10010100 10010010 10111010 11000100 11110011 01010011 00001001 11100111
0ef6492
to
96cc29c
Compare
@swift-ci please test |
This PR adds a proposal to generate `UUID's` using `RandomNumberGenerator`s
96cc29c
to
deeaab4
Compare
@swift-ci please test |
@itingliu I rebased the PR against latest main and migrated the tests to swift-testing |
@swift-ci please test |
I am very sorry that I let this implementation slip and did not get to this in time for 6.2. We'll have to defer it to 6.3 since we won't be able to merge it at this time. |
No worries. The PR is targeting main and I don't have a need to get it cherry picked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation LGTM aside from the availability update!
@jmschonfeld It looks like 6.3 is not yet defined do you want me to do this or are we landing this in a separate PR? |
That's almost landed in #1454 - just waiting on another check or two to finish and then will merge that. Sorry for the delay on that! |
Co-authored-by: Tina L <49205802+itingliu@users.noreply.github.com>
e94fff6
to
7e987cf
Compare
@jmschonfeld I pulled in just the |
@swift-ci please test |
This PR adds a proposal to generate
UUID's
usingRandomNumberGenerator
s